<h1>Listing books</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Author</th>
    <th>Publisher</th>
    <th>Publishing date</th>
  </tr>

<% for book in @books %>
  <tr>
    <td><%=h book.title %></td>
    <td><%=h book.author %></td>
    <td><%=h book.publisher %></td>
    <td><%=h book.publishing_date %></td>
    <td><%= link_to 'Show', book %></td>
    <td><%= link_to 'Edit', edit_book_path(book) %></td>
    <td><%= link_to 'Destroy', book, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New book', new_book_path %>
